export let getDate = (str) => {
    let date = new Date(str);
    let Y = '', M = '', D = '', H = '', m = '', s = '';

    if (isNaN(date.getTime())) {
        return '';
    }
    else {
        Y = date.getFullYear();
        M = date.getMonth() + 1;
        D = date.getDate();
        H = date.getHours();
        m = date.getMinutes();
        s = date.getSeconds();

        return [Y, M, D].join('-') + ' ' + [H, m, s].join(':');
    }
}